package com.briup.day05;

public class Test_Swap {
    public static void main(String[] args) {
        int x = 10;
        int y = 20;
        swap(x, y);
    }

    public static void swap(int a, int b) {
        System.out.println("交换前" + a + " " + b);
        a = a ^ b;
        b = a ^ b;
        a = a ^ b;
        System.out.println("交换后" + a + " " + b);
    }
}
